//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.aidong.dao.wills;

import com.aidong.dao.wills.BaseDao;
import com.aidong.model.wills.PssCheckListHis;
import java.util.List;
import org.springframework.stereotype.Repository;

@Repository
public class PssCheckListHisDao extends BaseDao<PssCheckListHis, Integer> {
    public PssCheckListHisDao() {
    }

    public PssCheckListHis getByProductCodeAndShopCode(String productCode, String shopCode) {
        return (PssCheckListHis)this.getByWhere("CheckShop=:p1 and ProductCode=:p2", new Object[]{shopCode, productCode});
    }

    public List<PssCheckListHis> queryCheckList(String shopCode) {
        String sql = "select a.ProductCode, a.CheckQuantity \n from PssCheckListHis a  \n where checkshop=:p1 and Convert(varchar(6),a.CheckDate,112) = convert(nvarchar(6),dateadd(day, -1, Getdate()),112) \n";
        return this.queryListBySql(PssCheckListHis.class, sql, new Object[]{shopCode});
    }
}
